package com.itheima.controller;

import com.itheima.domain.mongo.FocusUser;
import com.itheima.service.mongo.FocusUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/focusUser")
public class FocusUserController{

    @Autowired
    private FocusUserService focusUserService;

    @PostMapping("/save")
    public void save(@RequestBody FocusUser focusUser) {
        focusUserService.save(focusUser);
    }

    @PostMapping("/delete")
    public void delete(@RequestBody FocusUser focusUser) {
        focusUserService.delete(focusUser);
    }
}
